import { createStore } from 'vuex'

export default createStore({
  state: {
    currentAudio: null,  //当前歌曲
    isPlay: false,
    currentTime: '00:00'
  },
  mutations: {
    setCurrentAudio(state, payload) {
      state.currentAudio = payload
    },
    setIsPlay(state, payload) {
      state.isPlay = payload
    },
    setCurrentTime(state, payload) {
      state.currentTime = payload
    }
  },
  actions: {
  },
  modules: {
  }
})
